package singleton;

/**
 * 线程不安全
 */
public class LazySingleton {
    private static LazySingleton instance = null;

    private LazySingleton() {
        System.out.println("LazySingleton");
    }

    public static LazySingleton getInstance() {
        if (null == instance) {
            instance = new LazySingleton();
        }
        return instance;
    }
}